package com.powernobug.servlet;

import com.powernobug.bean.vo.BaseRespVo;
import com.powernobug.bean.vo.PageVo;
import com.powernobug.service.AdminRegionService;
import com.powernobug.service.impl.AdminRegionServiceImpl;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;

/**
 * @Author: 肖云戈
 * @CreateTime: 2024-08-21
 * @Description:
 */
@WebServlet("/region/list")
public class AdminRegionServlet extends CommonServlet{
    private static AdminRegionService adminRegionService = new AdminRegionServiceImpl();

    public BaseRespVo list(HttpServletRequest req) {
        // 无需请求报文中的参数，按需查询并封装返回数据即可
        PageVo pageData = adminRegionService.getAllRegionList();
        return BaseRespVo.okList(pageData);
    }
}
